// Package router
// @Author: zhangdi
// @File: router_code_generation
// @Version: 1.0.0
// @Date: 2023/10/17 14:36
package router

import (
	"server/application/constant/apis"
	"server/application/controller/sysctrl"
	"server/pkg/ginp"
)

func init() {
	//代码生成
	AppendRouter(ItemInfo{ //search
		Path:           apis.ApiGenGetEntityNames,                   //api路径
		Handlers:       ginp.ConvHandler(sysctrl.SysGenEntityNames), //对应控制器
		HttpType:       HttpPost,                                    //http请求类型
		NeedLogin:      true,                                        //是否需要登录
		NeedPermission: true,                                        //是否需要鉴权
		PermissionName: "Generation.get_entity_names",               //完整的权限名称,会跟权限表匹配
		Swagger:        &SwaggerInfo{IsIgnore: true},                //不需要生成swagger
	})

	AppendRouter(ItemInfo{ //search
		Path:           apis.ApiGenGetEntityInfo,                   //api路径
		Handlers:       ginp.ConvHandler(sysctrl.SysGenEntityInfo), //对应控制器
		HttpType:       HttpPost,                                   //http请求类型
		NeedLogin:      true,                                       //是否需要登录
		NeedPermission: true,                                       //是否需要鉴权
		PermissionName: "Generation.get_entity_info",               //完整的权限名称,会跟权限表匹配
		Swagger:        &SwaggerInfo{IsIgnore: true},               //不需要生成swagger
	})

	AppendRouter(ItemInfo{ //search
		Path:           apis.ApiGenGetEntitySave,                   //api路径
		Handlers:       ginp.ConvHandler(sysctrl.SysGenEntitySave), //对应控制器
		HttpType:       HttpPost,                                   //http请求类型
		NeedLogin:      true,                                       //是否需要登录
		NeedPermission: true,                                       //是否需要鉴权
		PermissionName: "Generation.entity_save",                   //完整的权限名称,会跟权限表匹配
		Swagger:        &SwaggerInfo{IsIgnore: true},               //不需要生成swagger
	})

	AppendRouter(ItemInfo{ //search
		Path:           apis.ApiGenFile,                      //api路径
		Handlers:       ginp.ConvHandler(sysctrl.SysGenFile), //对应控制器
		HttpType:       HttpPost,                             //http请求类型
		NeedLogin:      true,                                 //是否需要登录
		NeedPermission: true,                                 //是否需要鉴权
		PermissionName: "Generation.gen_file",                //完整的权限名称,会跟权限表匹配
		Swagger:        &SwaggerInfo{IsIgnore: true},         //不需要生成swagger
	})
	//{{append}}
}
